The goal of this proposal is to generate method and tools to link knowledge-based systems (KBSs) to real clinical databases. The linking is done via quires that map conceptual entities in the KBS to actual entries in the database. They may be used when a KBS is first created, when an existing KBS is linked to a database or when a KBS is transferred to another institution. The primary purpose of the queries is to apply the KBS to individual patients for direct patient care, rather than to extend the knowledge base itself. Several of the tools (Aims 3 and 4) are specific to the Arden Syntax for Medical Logic Modules (MLMs). All the proposed tools will be applied to CPMC's MLM knowledge base, which is actively used for patient care. AIM 1 to increase the accuracy while reducing the writing time and technical skills required to author clinical database queries. Query by Review will provide a familiar interface to novice query authors, enabling them to write queries by traversing the same type of result review screens that they use every day in clinical care. When data are selected from the screen, the tools will generate an appropriate query (in Arden Syntax and HL7) that can be inserted into a KBS or used for clinical research. AIM 2 to facilitate the testing of queries, and to improve the match between a query's result and the needs to a KBS. The Clinical Database Brower will allow author to characterize the data returned by a query in order to determine if they query is appropriate. It will also allow the author to determine whether additional logic is necessary to convert the raw data into form expected by the KBS. The Brower's design is unique in its use of a semantic network to aggregate complex categorical data. AIM 3 to provide an environment for inserting queries and additional logic into the KBS. The Advanced MLM Editor will include a mechanism for inserting queries generated by the Query by Review tool into MLMs. It will also allow authors to reuse queries and logic employed in existing MLMs. AIM 4 to facilitate the testing of queries within the environment of the KBS. The Event Playback tool will allow the MLM author to run an MLM against the clinical database to see whether the MLM performs as expected. Rather than presenting a snapshot of the database, the tool will run the MLM as if medical events (e.g, clinical database transactions) were occurring in real time, better simulating actual use. The Interactive MLM Interpreter will allow an author to debug an MLM by running it line-by line; the author will be able to respond to each query manually. It will also support the batch testing of MLMs using a test data set. AIM 5 to evaluate and disseminate the proposed tools. The impact of the Query by Review tool on query authoring time and query accuracy will be measured. To assess the usefulness of the tools for non-Arden Syntax KBS, findings from the QMR vocabulary will be studied. Usage of the tools will be measured for CPMC's production KBS. Tools, components, and methods will be disseminated.